MGen <- function(m, a, b)
{
     M = matrix(0, m, m)
     
     for(i in 1:(m-1)) {
           coin = sample(0:1, m, replace = T, prob = c(0.5,0.5))
          
           for(j in (i+1):m) {
                 

                 if(coin[j] == 0) 
                 {
                         M[i,j] = 0
                         M[j,i] = 0
                 } else
                 {
                       M[i,j] = runif(1, a, b)
                       M[j,i] = M[i,j]
                 }
           }
     }
     
     for(i in 1:m)
     {
           M[i,i] = -sum(M[i,])
     }
     
     return(M)
}
